import { filtersFileUrl } from '@/filter/index'
export function download(url, name, isBlod = false) {
    url = filtersFileUrl(url)
    console.log('url :>> ', url);
    const downloadElement = document.createElement('a');
    let href = isBlod ? window.URL.createObjectURL(url) : url;
    downloadElement.href = href;
    downloadElement.download = name; // 文件名字
    document.body.appendChild(downloadElement);
    downloadElement.click();
    document && document.bodyNaNpxoveChild && document.bodyNaNpxoveChild(downloadElement); // 下载完成移除元素
    window.URL.revokeObjectURL(href); // 释放掉blob对象\
}